home *** CD-ROM | disk | FTP | other *** search
/ Joystick Magazine 1999 November / cd joystick no109 novembre 1999.iso / Data / sharewares / utilitaires / XQXSET50.ZIP / _SETUP.1 / XQ DirShellEx.xpl < prev    next >
Text File  |  1999-06-13  |  2KB  |  76 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="1"
  3. "COUNT"="4"
  4. "UIPATH"="Appearance\Explorer\Context Menu"
  5. "NAME"="Directory Commands"
  6. "VERSION"="2.21"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="1. Name:"
  9. "TEXT 2"="1. Command:"
  10. "TEXT 3"="2. Name:"
  11. "TEXT 4"="2. Command:"
  12. "DESCRIPTION 1"="This plug-in can be used to add two commands to the context menu that appears if you right-click a directory in the Explorer."
  13. "DESCRIPTION 2"="First, enter a name for the command (e.g. "View with Explorer") in the field "Name"."
  14. "DESCRIPTION 3"="Then enter the command that should be executed if the item is selected in the field "Command"."
  15. "DESCRIPTION 4"="The name of the current directory can be inserted through "%1" (explorer.exe "%1")."
  16. "DESCRIPTION 5"="To remove the command again, clear both the "Name" and the "Command" field and press "Apply"."
  17. "AUTHOR"="Xteq Systems"
  18. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  19. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@xteq.com."
  20.  
  21.  
  22. sPath1="HKCR\Directory\Shell\XQXSETCMD1\"
  23. sPath2="HKCR\Directory\Shell\XQXSETCMD2\"
  24. sCMD="Command\@"
  25. Sub Plugin_Initialize
  26.  s=RegReadValue(sPath1 & sCMD)
  27.  if len(s)>0 then
  28.   s=RegReadValue(sPath1 & "@")
  29.   SetUIElement 1,s
  30.  
  31.   s=RegReadValue(sPath1 & sCMD)
  32.   SetUIElement 2,s
  33.  end if
  34.  
  35.  s=RegReadValue(sPath2 & sCMD)
  36.  if len(s)>0 then
  37.   s=RegReadValue(sPath2 & "@")
  38.   SetUIElement 3,s
  39.  
  40.   s=RegReadValue(sPath2 & sCMD)
  41.   SetUIElement 4,s
  42.  end if
  43. End Sub
  44.  
  45. Sub Plugin_CheckData(ElementIndex)
  46. End Sub
  47.  
  48. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  49.  s1=GetUIElement(1)
  50.  s2=GetUIElement(2)
  51.  if len(s1)>0 or len(s2)>0 then
  52.   Call RegWriteValue(sPath1 & sCMD,s2,1)
  53.   Call RegWriteValue(sPath1 & "@",s1,1)
  54.  else
  55.   if IsEmpty(RegReadValue(sPath1 & sCMD))=false then
  56.    Call RegDeletePath(sPath1 & "Command")
  57.    Call RegDeletePath(sPath1)
  58.   end if
  59.  end if
  60.  
  61.  s1=GetUIElement(3)
  62.  s2=GetUIElement(4)
  63.  if len(s1)>0 or len(s2)>0 then
  64.   Call RegWriteValue(sPath2 & sCMD,s2,1)
  65.   Call RegWriteValue(sPath2 & "@",s1,1)
  66.  else
  67.   if IsEmpty(RegReadValue(sPath2 & sCMD))=false then
  68.    Call RegDeletePath(sPath2 & "Command")
  69.    Call RegDeletePath(sPath2)
  70.   end if
  71.  end if
  72. End Sub
  73.  
  74. Sub Plugin_Terminate 
  75. End Sub
  76.